#ifndef DIALOGREPORTPREVIEW_H
#define DIALOGREPORTPREVIEW_H

#include "../common/seller.h"

#include <QDialog>
#include <QDate>
#include <QMap>



namespace Ui {
class DialogReportPreview;
}

class DialogReportPreview : public QDialog
{
    Q_OBJECT
    
public:
    explicit DialogReportPreview(QWidget *parent = 0);
    ~DialogReportPreview();
    
    void setTotalTurnOver(double value);
    void setTurnOverPerDay(const cs8ReportDataList &value);
    void setSharePercent(double value);
    void setShareAbsolute(double value);
    void setListDays(bool value);
    void addSeller(const QString &id, const QString & name, cs8Seller *seller);
    void createPreview();
private slots:
    void on_cbSaveAsPdf_clicked();

private:
    QString m_templateHeader,m_templateSeller;
    QStringList m_sellers;
    cs8ReportDataList m_turnOverPerDay;
    double m_totalTurnOver;
    double m_sharePercent;
    double m_shareAbsolute;
    bool m_listDays;
    Ui::DialogReportPreview *ui;

    void loadTemplates();
};

#endif // DIALOGREPORTPREVIEW_H
